package com.uppfind.framework.web.service.impl;

import com.uppfind.framework.core.service.impl.AbstractServiceImpl;
import com.uppfind.framework.web.bean.user.User;
import com.uppfind.framework.web.dao.mybatis.UserMapper;
import com.uppfind.framework.web.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by xuliugen on 2017/6/30.
 */
@Service("userService")
public class UserServiceImpl extends AbstractServiceImpl<User, String> implements UserService {

    //默认数据映射接口
    @Resource
    protected UserMapper userMapper;

    @Override
    protected UserMapper getMapper() {
        return this.userMapper;
    }

    public User selectByUserName(String username) {
        return this.getMapper().selectByUserName(username);
    }

    @Override
    public Class<String> getPKType() {
        return String.class;
    }

    @Override
    public void initAdminUser(User user) {
    }

    @Override
    public void initGuestUser(User user) {

    }

    @Override
    public void enableUser(String id) {

    }

    @Override
    public void disableUser(String id) {

    }

}
